<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title></title>
	<script type="text/javascript" src="Public/org/jquery.js"></script>
	<script type="text/javascript" src="Public/org/hdjs/hdjs.min.js"></script>
	<link rel="stylesheet" type="text/css" href="Public/org/hdjs/hdjs.css"/>
	<link rel="stylesheet" type="text/css" href="Public/org/home/css/myCart.css"/>
	<link rel="stylesheet" type="text/css" href="Public/org/home/fonts/awesome/css/font-awesome.min.css"/>
	<style type="text/css">
	.modalLog {
	  background: #fafafa;
	  padding-bottom: 50px;
	  /*border:1px solid red;*/
	}
	.modalLog form {
	  width: 272px;
	  margin: 0 auto;
	  padding: 10px 20px 10px;
	}
	.modalLog form p{
	  margin-top: 10px;
	  width: 100%;
	  overflow: hidden;
	  vertical-align: middle;
	}
	.modalLog form p span {
	  display: block;
	  float: left;
	  line-height: 28px;
	}
	.modalLog form p input {
	  width: 227px;
	  height: 28px;
	  border: 1px solid #A5AFC3;
	  text-indent: 5px;
	  color: #999999;
	  float: left;
	}
	.modalLog form p input.pwd {
	  width: 227px;
	}
	#hd-modal{
		border:1px solid #a10000;border-radius: 0;
	}
	.modalLog button {
	  margin: 2px 0 0px 42px;
	  border: 0;
	  width: 97px;
	  height: 27px;
	  color: #fff;
	  border-radius: 3px;
	  background: #a10000;
	}
}
</style>	
</head>
<body>
	<!--顶部-->
		<header>
			<div class="nav">
				<img alt="凡客诚品" src="http://i2.vanclimg.com/cms/20140829/vancl-logo.png">
				<p>您好,
					<?php if(!isset($_SESSION['id'])):?>
                    <a href="javascript:hd_modal_test();">登录</a>
                    |
                    <a href="index.php?m=Home&c=Reg&a=reg">注册</a>
            <?php else:?>
                <?php echo $_SESSION['nickname']?>
                    <a style="color:#a10000;" href="index.php?m=Home&c=Index&a=out">退出登录</a>
                    |
                    <a style="color:#a10000;" href="index.php?m=Home&c=Index&a=changeuser">更换用户</a>
            <?php endif;?>
				</p>				
			</div>	
			<!--进度-->
			<div class="flow">
				<span class="active">1.我的购物车</span>
				<span>2.填写核对信息单</span>
				<span>3.成功提交订单</span>
			</div>
			<!--进度结束-->
		</header>
		<!--顶部 end-->

		<!-- 没有货物的页面提示 -->
		<div>
			<p style="text-align: center;width: 980px;margin:50px auto 0;font-size:14px;font-weight: bold;height: 60px;color:gray">您的购物车中没有商品，请您先
			<a style="color:#a10000;font-weight: bold;text-decoration: underline" href="index.php">选购商品»</a>
			</p>
		</div>
		<!-- 没有货物的页面提示end -->
		<!--页脚-->
    	<footer style="margin-top: 30px;border:0;">
    		<p class="copyRight" style="color:#999;">Copyright 2007 - 2014 vancl.com All Rights Reserved 京ICP证100557号 京公网安备11011502002400号 出版物经营许可证新出发京批字第直110138号</p>
    		<div class="iconMsg">
    			<section class="iconDetail">
    				<a href="#" class="one"></a>
    				<a href="#" class="two"></a>
    				<a href="#" class="three"></a>
    				<a href="#" class="four"></a>
    				<a href="#" class="five"></a>
    				<a href="#" class="six"><img src="Public/org/home/images/kexin_brand_for_others.png"/></a>
    			</section>
    		</div>
    	</footer>
    <!--页脚end-->
</body>

<script>
var section = "<section class='modalLog'>";
section += "<form method='post'><p><span>用户名:</span><input type='text' name='username' value='' required placeholder='Email/手机号' /></p><p><span>密&nbsp;码:</span><input class='pwd' type='password' value='' required name='password' /></p></form><button onclick='login(this)' type='button'>登录</button></section>";
    function hd_modal_test() {
        hd_modal({
            width: 400,//宽度
            height: 250,//高度
            title: '请您登录后再结算',//标题
            content: section,//提示信息
            button: true,//显示按钮
            // button_success: "登录",//确定按钮文字
            // button_cancel: "退出",//关闭按钮文字
            timeout: 0,//自动关闭时间 0：不自动关闭
            shade: true,//背景遮罩
            shadeOpacity: 0.3,//背景透明度
            success: function () {//点击确定后的事件
            	
            },
            cancel: function () {//点击关闭后的事件

            }
        });
    }
</script>

<!-- 提交触发 -->
<script type="text/javascript">
	function push()
	{
		var userid = "<?php echo $userid?>";
		if(userid==0)
		{
			hd_modal_test();
			return false;
			
		}
		$('#pay').submit();
	}

	function login(obj)
	{
		var username = $(obj).parents('.modalLog').find('[name=username]').val(); 
    	var password = $(obj).parents('.modalLog').find('[name=password]').val();
    	var url = "<?php echo U('Login/cartSign')?>";
    	$.post(url,{username:username,password:password},function(data){
	        hd_alert({
	            message: data.message,//显示内容
	            timeout: 1,//显示时间
	            success: function () {//这是回调函数
	            	
	            }
	        });
	        //刷新一下页面
	        location.href = location.href;
    	})
	}
</script>
<!-- 提交触发end -->
</html>
